import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'
import news from '@/components/news'
import message from '@/components/message'
import me from '@/components/me'
import bole from '@/components/bole'
import lietou from '@/components/lietou'
import jobdetail from '@/components/jobdetail'
import wxlogin from '@/components/wxlogin'
import redirect from '@/components/redirect'
import complete from '@/components/complete'
import foo from '@/components/foo'
import dialog from '@/components/dialog'
import peopledetail from '@/components/peopledetail'
import myresumelist from '@/components/myresumelist'
import offerstatus from '@/components/offerstatus'
import download from '@/components/download'
import mycollection from '@/components/mycollection'
import addRes from '@/components/addRes'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/mycollection',

      name: 'mycollection',
      component: mycollection
    },
    {
      path: '/addRes',

      name: 'addRes',
      component: addRes
    },
    {
      path: '/download',

      name: 'download',
      component: download
    },
    {
      path: '/offerstatus',

      name: 'offerstatus',
      component: offerstatus
    },
    {
      path: '/peopledetail',
      name: 'peopledetail',
      component: peopledetail
    },
    {
      path: '/myresumelist',
      name: 'myresumelist',
      component: myresumelist
    },
    {
      path: '/index',
      name: 'index',
      component: index
    },
    {
      path: '/news',
      name: 'news',
      component: news
    },
    {
      path: '/message',
      name: 'message',
      component: message
    },
    {
      path: '/me',
      name: 'me',
      component: me
    },
    {
      path: '/bole',
      name: 'bole',
      component: bole
    },
    {
      path: '/lietou',
      name: 'lietou',
      component: lietou
    },
    {
      path: '/jobdetail',
      name: 'jobdetail',
      component: jobdetail
    },
    {
      path: '/wxlogin',
      name: 'wxlogin',
      component: wxlogin
    },
    {
      path: '/redirect',
      name: 'redirect',
      component: redirect,
      props: (route) => ({ query: route.query.code },{ query: route.query.state})
    },
    {
      path: '/complete',
      name: 'complete',
      component: complete
    },
    {
      path: '/foo',
      name: 'foo',
      component: foo
    },
    {
      path: '/dialog',
      name: 'dialog',
      component: dialog
    },
  ]
})
